import request from '@/utils/request'

export const getPermission = () => request.get('/sys/permission')

// 新增
export const addPermission = data => request.post('/sys/permission', data)

// 修改权限
export const updatePermission = data => request.put(`/sys/permission/${data.id}`, data)

// 删除权限
export const delPermission = id => request.delete(`/sys/permission/${id}`)

// 获取详情
export const getPermissionDetail = id => request.get(`/sys/permission/${id}`)

// 分配权限
export const assignPerm = data => request.put('/sys/role/assignPrem', data)
